<?php
/**
 * Created by PhpStorm.
 * User: gzc0918
 * Date: 2021-08-08
 * Time: 21:24
 */

namespace IMooc;


class SizeDrawDecorator implements DrawDecorator
{
    protected $size;
    public function __construct($size = 'red')
    {
        $this->size = $size;
    }

    function beforeDraw()
    {
        echo "<div style='font-size:{$this->size}'>";
    }
    function afterDraw()
    {
        echo "</div>";
    }
}